<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
   项目首页
   <table border="1">
       <tr><td>序号</td><td>课程名称</td><td>简介</td><td>教师</td><td>操作</td></tr>
       <tbody id="tb">

       </tbody>
   </table>
</body>
<script src="/js/jquery.min.js"></script>
<script>
    $(function (){
        showCourse();
    })
    function showCourse(){
        alert(1)
        $.ajax({
            url:"/course/query",
            method:'get',
            dataType:'json',
            success:function (res){
                //alert(res)
                $("#tb").empty();
                var row =''
                $.each(res,function (i,v){
                    row = row + "<tr><td>"+(i+1)+"</td>><td>"+v.cname+"</td><td>"+v.mark+"</td><td>"+v.tea+"</td><td>选择</td></tr>"
                })
                $("#tb").append(row);
            }

        })
    }
</script>
</html>